import Vue from 'vue'
import { all } from 'vue-client'

/* 异步注册组件 */

/** **************************主菜单******************************/
export default function () {
  Vue.component('res-main', (resolve) => { require(['./components/server/ResMain'], resolve) })
  Vue.component('resource-tree', (resolve) => { require(['./components/server/ResourceTree'], resolve) })
  /* eslint-disable no-new */
//部门
  Vue.component('department', (resolve) => { require(['./components/base/Department'], resolve)})
  Vue.component('add-department', (resolve) => { require(['./components/base/AddDepartment'], resolve)})

// 组织机构
  Vue.component('organization', (resolve) => { require(['./components/base/Organization'], resolve) })
  Vue.component('user', (resolve) => { require(['./components/base/User'], resolve) })
  Vue.component('add-org', (resolve) => { require(['./components/base/AddOrg'], resolve) })
  Vue.component('add-user', (resolve) => { require(['./components/base/AddUser'], resolve) })
// 区域
  Vue.component('zone', (resolve) => { require(['./components/base/Zone'], resolve) })
  Vue.component('add-region', (resolve) => { require(['./components/base/AddRegion'], resolve) })
// 角色
  Vue.component('parentrole', (resolve) => { require(['./components/role/Parentrole'], resolve) })
  Vue.component('role', (resolve) => { require(['./components/role/Role'], resolve) })
  Vue.component('add-role', (resolve) => { require(['./components/role/AddRole'], resolve) })
// 功能模块
// Vue.component('functiontree', (resolve) => { require(['./components/function/Functiontree'], resolve)})
  Vue.component('functiontree', (resolve) => { require(['./components/function/Function'], resolve) })
  Vue.component('function', (resolve) => { require(['./components/function/Function'], resolve) })
  Vue.component('add-function', (resolve) => { require(['./components/function/AddFunction'], resolve) })
  Vue.component('modify-function', (resolve) => { require(['./components/function/ModifyFunction'], resolve) })
// 策略授权
  Vue.component('edit', (resolve) => { require(['./components/Authorization/Edit'], resolve) })
// 调整资源位置
  Vue.component('adjust-pos', (resolve) => { require(['./components/base/AdjustPos'], resolve) })
}
